<?php

namespace app\common\model;

use plugin\admin\app\model\Base;

/**
 * @property integer $id (主键)
 * @property string $ip Ip
 * @property string $uri URL
 * @property string $method 类型
 * @property string $appid 应用平台appid
 * @property string $traceid traceid
 * @property string $referer 来源页
 * @property string $user_agent user_agent
 * @property string $query 请求参数
 * @property string $errcode 响应错误码
 * @property string $response 响应结果
 * @property string $exception 异常信息
 * @property string $exec_time 执行时间，单位毫秒
 * @property string $cookie 请求cookie
 * @property string $created_at
 */
class GlobalLog extends Base
{
    /**
     * The table associated with the model.
     *
     * @var string
     */
    protected $table = 'global_log_20240420';

    /**
     * The primary key associated with the table.
     *
     * @var string
     */
    protected $primaryKey = 'id';
    /**
     * Indicates if the model should be timestamped.
     *
     * @var bool
     */
    public $timestamps = false;

    public function setTable($table)
    {
        $table = 'global_log_'.$table;
        return parent::setTable($table); // TODO: Change the autogenerated stub
    }

}
